package com.yunxin.core.customer.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yunxin.core.customer.domain.MatchingProduct;
import com.yunxin.core.customer.service.MatchingProductService;
import com.yunxin.core.customer.mapper.MatchingProductMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Administrator
* @description 针对表【matching_product(客户匹配产品下拉表)】的数据库操作Service实现
* @createDate 2024-07-13 15:09:10
*/
@DS("crm")
@Service
public class MatchingProductServiceImpl extends ServiceImpl<MatchingProductMapper, MatchingProduct>
    implements MatchingProductService{

    @Override
    public List<MatchingProduct> getMatchingProductList(Integer teamId) {
        LambdaQueryWrapper<MatchingProduct> queryWrapper=new LambdaQueryWrapper<>();
        queryWrapper.eq(MatchingProduct::getTeamId,teamId)
                .orderByDesc(MatchingProduct::getId);
        return this.list(queryWrapper);
    }
}




